﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSharp.ConsoleTools
{
    public sealed class OutputHandler
    {
        #region declares
        // singleton member
        static readonly OutputHandler _instance = new OutputHandler();

        // menu area member
        private ConsoleArea _outputArea;
        #endregion



        #region constructor
        // singleton private constructor
        private OutputHandler()
        {
        }
        #endregion



        #region private functions
        #endregion



        #region properties
        // singleton instance getter
        public static OutputHandler Instance { get { return _instance; } }

        // menu area
        public ConsoleArea Area { get { return _outputArea; } }
        #endregion



        #region methods
        public void InitOutput(
            ConsoleArea OutputArea)
        {
            _outputArea = OutputArea;
        }

        public void AddContent(
            string Content)
        {
			Area.AddContent(Content);
        }

        public void ClearContent()
        {
            Area.ClearContent();
        }

        public void Render()
		{
			Area.Render();
		}
        #endregion
    }
}
